use ActionStatus;
use ActionResult;
use Component;

package Operation;

@ISA = qw/Component/;

sub new{
    my $class = shift;
    my $self = {};

    bless $self, $class;
    $self->init(@_);

    return $self;
}


sub init{
    my $self = shift;
    my $params = shift;

    if(ref $params ne "HASH"){
	$params = {};
    }

    $self->{PARAMS} = $params;
    $self->dependencies(qw/LogManager/);
}

sub perform{
    my $self = shift;

    return ActionResult->new("SUCCESS", "OK");
}

sub params{
    my $self = shift;
    my $newParams = shift;

    $self->{PARAMS} = $newParams if(defined($newParams));
    return $self->{PARAMS};
}

sub clone{
    my $self = shift;

    my $other = \%{$self};
    bless $other, ref $self;

    return $other;
}

1;
